This invention relates generally to video graphics circuitry and more particularly to rendering objects by the video graphics circuitry.
Computer systems are known to include a central processing unit, video graphics circuitry, audio processing circuitry, and peripheral ports. The peripheral ports allow the central processing unit to interact with peripheral devices such as monitors, printers, external tape drives, etc. The video graphics circuitry is operably coupled to receive geometric information from the central processing unit. The geometric information defines objects to be rendered by the video graphics circuitry. Typically, the objects to be rendered correspond to a particular application being performed by the central processing unit. Such applications include word processing applications, spreadsheet applications, presentation applications, drawing applications, video games, etc.
The video graphics circuitry processes the geometric information to produce pixel data that is subsequently provided to the display. The processing of the geometric information includes a pixel by pixel generation of pixel data and z value processing. The z value processing compares, on a pixel by pixel basis, the perceived depth of the current object element (e.g., a triangle) with previously rendered object elements at corresponding pixels. If the perceived depth of the current object element at a given pixel is in a more foreground position that the previously rendered object elements at the given pixel, a corresponding location in a Z buffer is updated with the z value of the current object element. In addition, the pixel data for the current object element is stored in a frame buffer at a location corresponding to the given pixel. If the perceived depth of the current object element at the given pixel is not in a more foreground position than the previously rendered object elements at the given pixel, the Z buffer is not updated. In addition, the pixel data for the object element at the given pixel is discarded.
Regardless of whether the Z buffer is updated and the pixel data of a currently processed object element is stored in the frame buffer, the processing is done at the pixel level. As such, if an entire object were in a background position with respect to previously rendered objects, each pixel of the object would need to be processed to make such a determination.
Therefore, a need exists for a method and apparatus that reduces the computational overhead for determining perceived depth (i.e., z value) of currently processed object elements.